Optimal. Leaf size=60 \[ \frac{(a-b) \tan ^3(e+f x)}{3 f}-\frac{(a-b) \tan (e+f x)}{f}+x (a-b)+\frac{b \tan ^5(e+f x)}{5 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0430068, antiderivative size = 60, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3631, 3473, 8} \[ \frac{(a-b) \tan ^3(e+f x)}{3 f}-\frac{(a-b) \tan (e+f x)}{f}+x (a-b)+\frac{b \tan ^5(e+f x)}{5 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3631
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=\frac{b \tan ^5(e+f x)}{5 f}+(a-b) \int \tan ^4(e+f x) \, dx\\ &=\frac{(a-b) \tan ^3(e+f x)}{3 f}+\frac{b \tan ^5(e+f x)}{5 f}+(-a+b) \int \tan ^2(e+f x) \, dx\\ &=-\frac{(a-b) \tan (e+f x)}{f}+\frac{(a-b) \tan ^3(e+f x)}{3 f}+\frac{b \tan ^5(e+f x)}{5 f}+(a-b) \int 1 \, dx\\ &=(a-b) x-\frac{(a-b) \tan (e+f x)}{f}+\frac{(a-b) \tan ^3(e+f x)}{3 f}+\frac{b \tan ^5(e+f x)}{5 f}\\ \end{align*}
Mathematica [A] time = 0.0373539, size = 97, normalized size = 1.62 \[ \frac{a \tan ^3(e+f x)}{3 f}+\frac{a \tan ^{-1}(\tan (e+f x))}{f}-\frac{a \tan (e+f x)}{f}+\frac{b \tan ^5(e+f x)}{5 f}-\frac{b \tan ^3(e+f x)}{3 f}-\frac{b \tan ^{-1}(\tan (e+f x))}{f}+\frac{b \tan (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.004, size = 92, normalized size = 1.5 \begin{align*}{\frac{b \left ( \tan \left ( fx+e \right ) \right ) ^{5}}{5\,f}}+{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}a}{3\,f}}-{\frac{b \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3\,f}}-{\frac{a\tan \left ( fx+e \right ) }{f}}+{\frac{b\tan \left ( fx+e \right ) }{f}}+{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) a}{f}}-{\frac{b\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.68851, size = 77, normalized size = 1.28 \begin{align*} \frac{3 \, b \tan \left (f x + e\right )^{5} + 5 \,{\left (a - b\right )} \tan \left (f x + e\right )^{3} + 15 \,{\left (f x + e\right )}{\left (a - b\right )} - 15 \,{\left (a - b\right )} \tan \left (f x + e\right )}{15 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.0566, size = 134, normalized size = 2.23 \begin{align*} \frac{3 \, b \tan \left (f x + e\right )^{5} + 5 \,{\left (a - b\right )} \tan \left (f x + e\right )^{3} + 15 \,{\left (a - b\right )} f x - 15 \,{\left (a - b\right )} \tan \left (f x + e\right )}{15 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.663574, size = 82, normalized size = 1.37 \begin{align*} \begin{cases} a x + \frac{a \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac{a \tan{\left (e + f x \right )}}{f} - b x + \frac{b \tan ^{5}{\left (e + f x \right )}}{5 f} - \frac{b \tan ^{3}{\left (e + f x \right )}}{3 f} + \frac{b \tan{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \tan ^{4}{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 2.63965, size = 855, normalized size = 14.25 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]